package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;
import java.time.Duration;

public class ReactorDelayElementsExample {
    public static void main(String[] args) throws InterruptedException {
        Flux<Integer> source = Flux.range(1, 3);

        // 延迟每个元素的发送
        source.delayElements(Duration.ofSeconds(1))
                .subscribe(System.out::println);
        Thread.sleep(23333);
    }
}
